home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 9 / Night Owl CD-ROM (NOPV9) (Night Owl Publisher) (1993).ISO / 002a / vc50_jan.zip / VSEARCH.BAT < prev    next >
DOS Batch File  |  1993-01-24  |  4KB  |  92 lines

  1. ECHO OFF
  2. CLS
  3. IF NOT EXIST VCHECK.COM GOTO DIRERROR
  4. ECHO  ╔════════════════════════════════════════════════════════════════╗
  5. ECHO  ║ VSEARCH - The ultimate line of defense against computer virus. ║
  6. ECHO  ║                                                                ║
  7. ECHO  ║ This program harnesses the power of VCHECK and VCOMP to detect ║
  8. ECHO  ║ ANY changes in your virus-vulnerable files. It does this by    ║ 
  9. ECHO  ║ comparing the checksums that VCHECK creates. Even if you don't ║
  10. ECHO  ║ know about checksums, rest assured that no alteration to a     ║
  11. ECHO  ║ program may be made without changing the checksum.  This will  ║ 
  12. ECHO  ║ take some time, but it will be worth it.                       ║
  13. ECHO  ║ You'll not have to run this procedure frequently.              ║
  14. ECHO  ╚════════════════════════════════════════════════════════════════╝
  15. ECHO  
  16. FOR %%A IN (NEW new) DO IF "%1"=="%%A" ERASE VSUM.REF
  17. IF EXIST VSUM.REF GOTO HDRPAUSE
  18. ECHO     ╔══════════════════════════════════════════════════════╗
  19. ECHO     ║ First off, you'll want to create a "reference" list  ║
  20. ECHO     ║ of checksums for later comparison using VSEARCH.     ║
  21. ECHO     ║ Do you want to make the reference list now?          ║
  22. :HDRPAUSE
  23. if not exist VSUM.REF ECHO     ╚══════════════════════════════════════════════════════╝
  24. ECHO     [ HIT ANY KEY TO CONTINUE (OR Ctrl-Break TO QUIT) ]
  25. ECHO  
  26. PAUSE > NUL
  27. CLS
  28. IF NOT EXIST VSUM.REF GOTO MAKENEW
  29. ECHO Creating comparison list now. This may take a few minutes...
  30. ECHO  
  31. VCHECK /VSUM.NEW
  32. CLS
  33. ECHO       ╔══════════════════════════════════════════════════╗
  34. ECHO       ║ Comparing new list with reference . . .          ║
  35. ECHO       ║                                                  ║
  36. ECHO       ║ Any differences will be detected.                ║
  37. ECHO       ║ Different file statistics mean that file has     ║
  38. ECHO       ║ been altered -- probably by a virus or bomb.     ║
  39. ECHO       ║ Replace any such files if there is any doubt.    ║
  40. ECHO       ╚══════════════════════════════════════════════════╝
  41. VCOMP VSUM.REF VSUM.NEW > VSUM.!!!
  42. REM errorlevel 2 means diffs were found; 1 means file was infected.
  43. IF NOT ERRORLEVEL 2 GOTO NODIFFS
  44. ECHO VCOMP DETECTED DIFFERENCES.  SEE FILE "VSUM.!!!" 
  45. ECHO  A note stating - STATISTICS NOT SAME !!! -
  46. ECHO  could indicate a file changed by a virus.
  47. GET Do you want to see VSUM.!!! now? [Y]es/other key to quit
  48. IF ERRORLEVEL 90 GOTO EXITMSG
  49. IF NOT ERRORLEVEL 89 GOTO EXITMSG
  50. CLS
  51. IF EXIST VSUM.!!! TYPE VSUM.!!!
  52. GOTO EXITMSG
  53. :NODIFFS
  54. ERASE VSUM.!!! > NUL
  55. ECHO  
  56. ECHO             OK, NO DIFFERENCES DETECTED 
  57. ECHO  
  58. GOTO EXITMSG
  59. :DIRERROR
  60. ECHO  
  61. ECHO      ╔═════════════════════════════════════════════════════╗
  62. ECHO      ║ You should be in the Victor Charlie Home Directory  ║
  63. ECHO      ║ to use this program as it stands. If not, you will  ║
  64. ECHO      ║ have VSUM.REF files dotted around your disk.        ║
  65. ECHO      ║ You can easily edit VSEARCH to your own needs.      ║
  66. ECHO      ╚═════════════════════════════════════════════════════╝
  67. ECHO  
  68. GOTO EXIT
  69. :MAKENEW
  70. ECHO  ╔════════════════════════════════════════════════════════════╗
  71. ECHO  ║ VSUM.REF does not exist.  Creating it now.                 ║
  72. ECHO  ║ directory of this drive. Stand by please . . .             ║
  73. ECHO  
  74. ECHO    (Actual output is being redirected. This could take a few minutes  ...)
  75. VCHECK /VSUM.REF
  76. ECHO  
  77. ECHO  ╔════════════════════════════════════════════════════════════╗
  78. ECHO  ║ OK!  Statistics of vulnerable files are recorded in        ║
  79. ECHO  ║ VSUM.REF.                                                  ║
  80. ECHO  ║ When you really need to do an exhaustive search of         ║
  81. ECHO  ║ executables for changes, just run VSEARCH again.           ║
  82. ECHO  ║  This is an advanced line of defense, should VCHECK        ║
  83. ECHO  ║ fail to spot the infected programs with a passive search.  ║
  84. ECHO  ╚════════════════════════════════════════════════════════════╝
  85. :EXITMSG
  86. ECHO   ╔═════════════════════════════════════════════════════════╗
  87. ECHO   ║ Remember: if you change, add or delete any PROGRAMS     ║
  88. ECHO   ║ in your computer, you should delete VSUM.REF and make   ║
  89. ECHO   ║ a fresh list by running VSEARCH. This warning does NOT  ║
  90. ECHO   ║ apply to new data files, which VSEARCH does not check.  ║
  91. ECHO   ╚═════════════════════════════════════════════════════════╝
  92. :EXIT